<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class ChangeColumFieldTextInOriginalPlanNodeTable extends AbstractMigration
{
    public function up()
    {
        $table = $this->table('original_plan_node');
        $table->changeColumn('deprecated_task_ids', 'text', ['null' => true, 'comment' => '废除任务ids'])
            ->changeColumn('deprecated_entity_ids', 'text', ['null' => true, 'comment' => '废除实体ids'])
            ->save();
    }

    public function down()
    {
        $table = $this->table('original_plan_node');
        $table->changeColumn('deprecated_task_ids', 'string', ['default' => '', 'limit' => 255, 'comment' => '废除任务ids'])
            ->changeColumn('deprecated_entity_ids', 'string', ['default' => '', 'limit' => 255, 'comment' => '废除实体ids'])
            ->save();
    }
}
